package test;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.junit.Test;

import java.util.Base64;

public class Tset3 {

    @Test
    public void an() {
        Test2 test2 = new Test2();
        JtwTest jtwTest = new JtwTest();
        String[] jwt = jtwTest.getJWT();
       String decode =new String(Base64.getDecoder().decode(jwt[1])) ;
        String s = JSONArray.toJSONString(decode);
        System.out.println(s);
//        JSONObject jsonObject1 =JSONObject.parseObject(s);
//        System.out.println(jsonObject1.get("name"));
        System.out.println(test2.md5(jwt[1] + "123123"));
        if (jwt[2].equals(test2.md5(jwt[1] + "123123"))) {
            System.out.println("true");
        }

    }


}
